package com.fun.feifun.modules.business.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fun.feifun.base.BaseEntity;
import com.fun.feifun.modules.business.model.dto.BusinessUserRouteDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 业务用户商品信息
 * </p>
 *
 * @author wkf
 * @since 2024-08-18
 */
@Data
@Accessors(chain = true)
@ApiModel(value="BusinessUserRoute对象", description="业务用户商品信息")
public class BusinessUserRoute {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    public Long id;

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    private Long goodsId;

    @ApiModelProperty(value = "经销商")
    private Long supplierId;

    @ApiModelProperty(value = "商品优先级 0最小 999最大")
    private Integer priorityLevel;

    @ApiModelProperty(value = "供货商联系人")
    private String contactName;

    public BusinessUserRouteDto toDto(){
        BusinessUserRouteDto dto = new BusinessUserRouteDto();
        dto.setContactName(contactName);
        dto.setSupplierId(this.getSupplierId());
        dto.setId(id);
        return dto;
    }
}
